import React, { useEffect, useState } from "react";

export default function HookUse() {
  const [state, setState] = useState();
  //   if(state) {
  //     useEffect(() => {});
  //   }
  const str = useString();
  useEffect(() => {});
  useData(() => {
    console.log("hello");
  }, []);

  return <div>HookUse, {str}</div>;
}

function useData(cb, deps) {
  useEffect(cb, deps);
}

function useString() {
  const [state, setState] = useState("luyi");
  return state;
}
